<%@ page language="java" import="java.util.*,cn.ac.cintcm.dataconverge.util.Constants,com.hs.core.utils.*" pageEncoding="UTF-8"%>
<%@ page import ="cn.ac.cintcm.dataconverge.researchsubject.domain.*,cn.ac.cintcm.dataconverge.researcher.domain.*" %> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String subjectId = request.getParameter("subjectId");
AchievemanAchievement obj = (AchievemanAchievement)request.getAttribute("achObj");
%> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
    <title>科研项目管理与数据汇交平台</title>  
	<script language="javascript" type="text/javascript" src="<%=basePath %>js/My97DatePicker/WdatePicker.js"></script>
	<script language="javascript" src="<%=basePath %>index/Scripts/script.js"></script>
	<script language="javascript" src="<%=basePath %>js/common.js"></script>
	<link href="<%=basePath %>index/Themes/com/style.css" type="text/css" rel="stylesheet"></link>
	<script src='<%=basePath%>dwr/engine.js'></script>
     <script src='<%=basePath%>dwr/util.js'></script> 
     <script src='<%=basePath%>dwr/interface/subject.js'></script>
    <script type="text/javascript" language="javascript">
    var achId = "<%=obj == null?"":obj.getId()%>";  
	function checkForm(){ 
	    var flag = false;
		if(isNull(form2.name.value)){
			alert("请填写成果名称");
			form2.name.focus();
			return false;
		} 
		var typeId = "";
		var embodyId = "";
		var embodyForm = document.getElementsByName("embodyForm");
		var type = document.getElementsByName("type");
		for(var i=0;i<type.length;i++){
		   if(type[i].checked){
		      typeId = type[i].value;
		   }
		}
		for(var j=0;j<embodyForm.length;j++){
		   if(embodyForm[j].checked){
		      embodyId = embodyForm[i].value; 
		   }
		}
		if("" == typeId){
			alert("请选择成果类型");
			return false;
		}
		if("" == embodyId){
			alert("请选择成果体现形式");
			return false;
		}
		return true;
	} 
    
	function saveData(modId,tomodId){
		if(checkForm()){ 
		   form2.action = "<%=path%>/achieve.htm?action=saveData&modId="+modId+"&subjectId=<%=subjectId%>&tomodId="+tomodId;
		   form2.submit(); 
	   } 
	}
	function changeTop(){  
         var obj = parent.frames("bannerFrame");   
         obj.location.href="<%=path%>/achieve.htm?action=top&modId=1&achId=<%=obj==null?"":obj.getId() %>";
    }
</script>  
</head>
<body class="rtm_body" scroll=yes>
<form name="form2" action="" method="post"> 
    <div style="margin-top:0px">
     <table id="Table9" cellspacing="0" cellpadding="0" width="100%" border="0">
            <tr valign="top"> 
                <td class="fw_ptmain_bd_05" align="left" style="height: 155px;"> 
                      <table  cellspacing="0" cellpadding="0" width="100%" style="border-right: #9b9b9b 1px solid;
                        border-left: #9b9b9b 0px solid; border-bottom: #9b9b9b 1px solid" id="Table22"
                        border="0"> 
                        <tr align="center">
                            <td valign="top">
                                <!--三部分内容-->
                                <div class="tab2_fim_div" id="navDiv10"> 
                        			 	<div id="tdForm"> 
		                                    <table border="0" cellpadding="0" cellspacing="1" width="100%"   class="dg_borderstyle">
		                                      
		                                        <tr>
		                                            <td class="fim_l" width="10%">成果名称（中文）(<font color="red">＊</font>)</td>
		                                            <td class="fim_r"  colspan="3">
		                                            <input type="text" name="name" value="<%=obj==null?"":StringUtilTool.NULL2Blank(obj.getAchievename()) %>" class="com_textbox" style="width:100%"/>
		                                            <input type="hidden" name="achId" value="<%=obj==null?"":obj.getId() %>" />
		                                            </td> 
		                                        </tr> 
		                                        <tr>
		                                            <td class="fim_l" width="10%">成果名称（英文）</td>
		                                            <td class="fim_r"   colspan="3">
		                                            <input type="text" name="nameEn" value="<%=obj==null?"":StringUtilTool.NULL2Blank(obj.getAchievenameEn()) %>" class="com_textbox" style="width:100%"/></td> 
		                                        </tr>  
		                                        <tr>
		                                            <td class="fim_l" width="10%">成果年份</td>
		                                            <td class="fim_r"  width="40%">
		                                            <input type="text" class="Wdate" id="year" value="<%=obj==null?"":StringUtilTool.NULL2Blank(obj.getYear()) %>" style="width:99%" name="year"  onFocus="WdatePicker({el:'year',dateFmt:'yyyy'})" /></td> 
		                                            <td class="fim_l" width="10%">实际投入经费额</td>
		                                            <td class="fim_r"  >
		                                            <input type="text" name="fund" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" value="<%=obj==null?"":StringUtilTool.NULL2Blank(obj.getFund()) %>" class="com_textbox" style="width:100%"/></td> 
		                                        </tr> 
		                                         <tr>
		                                            <td class="fim_l" width="10%">成果密级</td>
		                                            <td class="fim_r"  colspan="3">
		                                            <input type="radio" name="grade" value="1" <%if(null != obj && "1".equals(obj.getGrade())){out.println(" checked");}%>>无密级 
		                                            <input type="radio" name="grade" value="2" <%if(null != obj && "2".equals(obj.getGrade())){out.println(" checked");}%>>秘密 
		                                            <input type="radio" name="grade" value="3" <%if(null != obj && "3".equals(obj.getGrade())){out.println(" checked");}%>>机密
													<input type="radio" name="grade" value="4" <%if(null != obj && "4".equals(obj.getGrade())){out.println(" checked");}%>>绝密</td> 
		                                        </tr> 
		                                        <tr>
		                                            <td class="fim_l" width="10%">成果类型(<font color="red">＊</font>)</td>
		                                            <td class="fim_r"  colspan="3">
		                                            <input type="radio" name="type" value="1" <%if(null != obj && "1".equals(obj.getType())){out.println(" checked");}%>>应用技术 
		                                            <input type="radio" name="type" value="2" <%if(null != obj && "2".equals(obj.getType())){out.println(" checked");}%>>软科学
													<input type="radio" name="type" value="3" <%if(null != obj && "3".equals(obj.getType())){out.println(" checked");}%>>基础理论
													<input type="radio" name="type" value="0" <%if(null != obj && "0".equals(obj.getType())){out.println(" checked");}%>>其它
		                                            </td> 
		                                        </tr> 
		                                        <tr>
		                                            <td class="fim_l" width="10%">成果水平</td>
		                                            <td class="fim_r"  colspan="3">
		                                            <input type="radio" name="levels" value="1" <%if(null != obj && "1".equals(obj.getLevels())){out.println(" checked");}%>>国际领先
		                                            <input type="radio" name="levels" value="2" <%if(null != obj && "2".equals(obj.getLevels())){out.println(" checked");}%>>国际先进 
		                                            <input type="radio" name="levels" value="3" <%if(null != obj && "3".equals(obj.getLevels())){out.println(" checked");}%>>国内领先 
		                                            <input type="radio" name="levels" value="4" <%if(null != obj && "4".equals(obj.getLevels())){out.println(" checked");}%>>国内先进 
		                                            <input type="radio" name="levels" value="5" <%if(null != obj && "5".equals(obj.getLevels())){out.println(" checked");}%>>国内一般
		                                            </td> 
		                                        </tr> 
		                                        <tr>
		                                            <td class="fim_l" width="10%">成果属性</td>
		                                            <td class="fim_r"  colspan="3">
		                                            <input type="radio" name="attribute" value="1" <%if(null != obj && "1".equals(obj.getAttribute())){out.println(" checked");}%>>原始性创新
													 <input type="radio" name="attribute" value="2" <%if(null != obj && "2".equals(obj.getAttribute())){out.println(" checked");}%>>国外引进消化吸收创新
													  <input type="radio" name="attribute" value="3" <%if(null != obj && "3".equals(obj.getAttribute())){out.println(" checked");}%>>国内技术二次开发 
													  <input type="radio" name="attribute" value="0" <%if(null != obj && "4".equals(obj.getAttribute())){out.println(" checked");}%>>其它
													</td> 
		                                        </tr> 
		                                        <tr>
		                                            <td class="fim_l" width="10%">成果体现形式 (<font color="red">＊</font>)</td>
		                                            <td class="fim_r"  colspan="3"> 
		                                            <input name="embodyForm" type="checkbox" value="3" <%if(null != obj && null != obj.getEmbodyform() && obj.getEmbodyform().indexOf("3")!=-1){out.println(" checked");}%>>新材料
													<input name="embodyForm" type="checkbox" value="5" <%if(null != obj && null != obj.getEmbodyform() && obj.getEmbodyform().indexOf("5")!=-1){out.println(" checked");}%>>专利		 
													<input name="embodyForm" type="checkbox" value="7" <%if(null != obj && null != obj.getEmbodyform() && obj.getEmbodyform().indexOf("7")!=-1){out.println(" checked");}%>>软件版权 
													<input name="embodyForm" type="checkbox" value="2" <%if(null != obj && null != obj.getEmbodyform() && obj.getEmbodyform().indexOf("2")!=-1){out.println(" checked");}%>>新产品 
													<input name="embodyForm" type="checkbox" value="0" <%if(null != obj && null != obj.getEmbodyform() && obj.getEmbodyform().indexOf("0")!=-1){out.println(" checked");}%>>其它 
													<input name="embodyForm" type="checkbox" value="4" <%if(null != obj && null != obj.getEmbodyform() && obj.getEmbodyform().indexOf("4")!=-1){out.println(" checked");}%>>论文（著作） 
													<input name="embodyForm" type="checkbox" value="8" <%if(null != obj && null != obj.getEmbodyform() && obj.getEmbodyform().indexOf("8")!=-1){out.println(" checked");}%>>标准 
													<input name="embodyForm" type="checkbox" value="6" <%if(null != obj && null != obj.getEmbodyform() && obj.getEmbodyform().indexOf("6")!=-1){out.println(" checked");}%>>临床方案 
													<input name="embodyForm" type="checkbox" value="1" <%if(null != obj && null != obj.getEmbodyform() && obj.getEmbodyform().indexOf("1")!=-1){out.println(" checked");}%>>新技术 
                                                     </td> 
		                                        </tr> 
		                                        <tr>
		                                            <td class="fim_l" width="10%">研究形式</td>
		                                            <td class="fim_r"  colspan="3">
		                                            <input type="radio" name="rform" value="1" <%if(null != obj && "1".equals(obj.getForm())){out.println(" checked");}%>>独立研究
		                                             <input type="radio" name="rform" value="2" <%if(null != obj && "2".equals(obj.getForm())){out.println(" checked");}%>>与企业合作
														<input type="radio" name="rform" value="3" <%if(null != obj && "3".equals(obj.getForm())){out.println(" checked");}%>>与院校或院所合作 
														<input type="radio" name="rform" value="4" <%if(null != obj && "4".equals(obj.getForm())){out.println(" checked");}%>>与国外合作 
														<input type="radio" name="rform" value="0" <%if(null != obj && "0".equals(obj.getForm())){out.println(" checked");}%>>其它
 													</td> 
		                                        </tr> 
		                                        <tr>
		                                            <td class="fim_l" width="10%">项目合作方式</td>
		                                            <td class="fim_r"  colspan="3">
		                                            <input type="radio" name="coType" value="3" <%if(null != obj && "3".equals(obj.getCotype())){out.println(" checked");}%>>技术服务
													<input type="radio" name="coType" value="1" <%if(null != obj && "1".equals(obj.getCotype())){out.println(" checked");}%>>技术合作 
													<input type="radio" name="coType" value="2" <%if(null != obj && "2".equals(obj.getCotype())){out.println(" checked");}%>>资金合作			
													<input type="radio" name="coType" value="4" <%if(null != obj && "4".equals(obj.getCotype())){out.println(" checked");}%>>合作开发
													<input type="radio" name="coType" value="0" <%if(null != obj && "0".equals(obj.getCotype())){out.println(" checked");}%>>其它
												    </td> 
		                                        </tr> 
		                                        <tr>
		                                        <td colspan=4> 
		                                        <table cellspacing="0" cellpadding="0" width="100%" class="idt_bottom_mg" border="0">
				                                    <tr>
				                                        <td align="center">
				                                            <input type="button" value=" 保存 "   class="com_btn2"   onclick="saveData('1','1')" /> &nbsp;&nbsp; <input type="button" value=" 下一步 "   class="com_btn2"   onclick="saveData('1','2')" /> 
				                                        </td>
				                                    </tr>
				                                </table>
                                                </td>
                                                </tr>
		                                    </table>   
                               			</div> 
                                </div>
                            </td>
                        </tr>
                       
                    </table>
             	 </td>
              </tr>
           </table>
         </div> 
         
         </form>
         
</body>
</html> 
<script type="text/javascript" language="javascript"> 
changeTop(); 
</script>
